import { observable, action } from '@/miniprogram_npm/mobx-miniprogram/index';

export default observable({
    entries: [],
    entryLoaded: false,

    setEntries: action(function (payload) {
        this.entries = payload;
        this.entryLoaded = true;
    }),

    getEntryByTitle(title) {
        return this.entries.find((item) => item.title === title);
    },

    getOrdinaryEntries() {
        return this.entries.filter((item) => item.title !== '模型介绍' && item.title !== '简介');
    }
});
